import { HttpClient } from '@angular/common/http';
import { Inject, Injectable } from '@angular/core';
import { API_CONFIG, ServiceModule } from './service.module';
@Injectable({
  providedIn: ServiceModule
})
export class CollectPlatformService {

  constructor(private http: HttpClient, @Inject(API_CONFIG) private uri: string) { }

  findAll() {
    return this.http.get(`${this.uri}/collect-platform`)
  }
  findOne(id: string) {
    return this.http.get(`${this.uri}/collect-platform/${id}`)
  }
  create(body) {
    return this.http.post(`${this.uri}/collect-platform`, body)
  }
  update(body: any, id: number) {
    return this.http.put(`${this.uri}/collect-platform/${id}`, body)
  }
  remove(id: string) {
    return this.http.delete(`${this.uri}/collect-platform/${id}`)
  }

}
